local other__kuiji = fk.CreateSkill{
  name = "other__kuiji",
}
Fk:loadTranslationTable{
["other__kuiji"]="窥机",
[":other__kuiji"]="你上家或下家的摸牌时你有50%概率看到其所有手牌",
}
local U = require "packages/utility/utility"
other__kuiji:addEffect(fk.DrawNCards, {
  can_trigger = function(self, event, target, player, data)
    local p = player.room:getOtherPlayers(player)
    if target == p and (p:getNextAlive() == player or player:getNextAlive() == p) and not p:isNude() then
      event:setCostData(self, {tos = p})
      return true
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local x = math.random(1, 6)
    local to = event:getCostData(self).tos[1]
    if x > 3 then 
      U.viewCards(player, to:getCardIds("h"), other__kuiji.name, "$ViewCardsFrom:"..to.id)
    end
  end,
})

  

return other__kuiji
